package com.carpedil.client.order.service;

import com.carpedil.common.dto.OrderDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/** @author Administrator */
// @FeignClient(name = "FeiginOrderService", url = "http://localhost:6002/")
@FeignClient("orderServer")
public interface FeiginOrderService {
  @GetMapping("/order/info")
  public String info();

  @PostMapping("/order/new_order")
  public String createOrder(@RequestBody OrderDTO dto);

  @GetMapping("/order/update_status/{orderId}/{code}")
  @ResponseBody
  public Integer updateOrderStatus(
      @PathVariable("orderId") String orderId, @PathVariable("code") Integer code);

  @GetMapping("/order/index/{token}")
  public String index(@PathVariable("token") String token);
}
